package com.zxw.article.service;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zxw.common.entity.category.ArticleCategoryEntity;
import com.zxw.common.entity.category.ArticleCategoryListQuery;
import com.zxw.common.entity.category.ArticleCategoryQuery;
import com.zxw.common.entity.category.ArticleCategoryVO;

import java.util.List;

/**
 * <p>
 * 文章分类表 服务类
 * </p>
 *
 * @author zhanxuewei
 * @since 2022-09-19
 */
public interface ArticleCategoryService extends IService<ArticleCategoryEntity> {

    /**
     * 添加
     *
     * @param articleCategoryQuery ArticleCategoryQuery
     * @return 是否成功 true|false
     */
    boolean save(ArticleCategoryQuery articleCategoryQuery);

    /**
     * 批量添加
     *
     * @param list List<ArticleCategoryQuery>
     * @return 是否成功 true|false
     */
    boolean saveBatch(List<ArticleCategoryQuery> list);

    /**
     * 根据ID集合批量删除
     *
     * @param ids id集合
     * @return 是否成功 true|false
     */
    boolean removeByIds(List<String> ids);

    /**
     * 根据ID修改
     *
     * @param articleCategoryQuery ArticleCategoryQuery
     * @return 是否成功 true|false
     */
    boolean updateById(ArticleCategoryQuery articleCategoryQuery);

    /**
     * 根据ID查询数据
     *
     * @param id ID
     * @return ArticleCategoryDO
     */
    ArticleCategoryEntity getById(String id);

    /**
     * 条件分页查询
     *
     * @param articleCategoryListQuery ArticleCategoryListQuery
     * @return IPage<ArticleCategoryDO>
     */
    IPage<ArticleCategoryEntity> list(ArticleCategoryListQuery articleCategoryListQuery);

    /**
     * 分页
     * @param articleCategoryListQuery
     * @return
     */
    IPage<ArticleCategoryVO> pageList(ArticleCategoryListQuery articleCategoryListQuery);

    ArticleCategoryEntity queryByName(String name);

    List<ArticleCategoryVO> queryList(ArticleCategoryListQuery articleCategoryListQuery);

}
